/**
 * @Title: BalanceType
 * @Package cn.com.yiqi.wsc.service.balance.enumeration
 * @Description: TODO
 * Copyright: Copyright (c) 2016
 * Company: 成都壹柒互动科技有限公司
 * @author 会员系统组-胥钰淋
 * @date 2017/3/3 11:30
 * @version V1.0
 */
package cn.com.yiqi.wsc.service.balance.enumeration;

/**
 *
 *@ClassName: BalanceType
 * @Description: TODO
 * @author 会员系统组-胥钰淋
 * @date 2017/3/3 11:30
 *
 */
public enum BalanceType {
    buy(1),//购买
    refund(2),//退款
    fetch(3),//提现
    point_to_balance(4),//积分兑换
    spread_sale(5);//分销返现

    private int value;

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    private BalanceType(int value) {
        this.value = value;
    }

    public static BalanceType getByValue(int value) {
        for (BalanceType type:
                BalanceType.values()) {
            if (type.value == value) {
                return type;
            }
        }
        return null;
    }
}
